//
//  BaseModel.m
//  20-Homework
//
//  Created by dllo on 16/8/10.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
- (instancetype)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (BaseModel *)modelWithDictionary:(NSDictionary *)dictionary {
    return [[self alloc] initWithDictionary:dictionary];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {}

- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}
- (NSString *)description {
    return [NSString stringWithFormat:@"%@", _string];
}
@end
